﻿using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using KalevaAalto.DataPart.Models;
using OfficeOpenXml.FormulaParsing.ExpressionGraph.FunctionCompilers;

namespace KalevaAalto.DataPart.Excel.Base
{
    public abstract class BaseColumns : BaseWorksheetElement, IEnumerable<BaseColumns>
    {
        public BaseColumns(BaseWorksheet worksheet) : base(worksheet)
        {
        }

        public abstract IStyle Sytle { get; }
        public virtual int Count => this.Count();

        public virtual BaseColumns this[int index] => this.ElementAt(index - 1);

        public abstract double Width { get; set; }

        public abstract IEnumerator<BaseColumns> GetEnumerator();

        IEnumerator IEnumerable.GetEnumerator() => GetEnumerator();


        public abstract void AutoFit();
        
    }
}
